# _*_ coding utf-8 _*_
# FILENAME：.py
# DESCRIPTION: 
# AUTH: 
# DATE: 2022/6/1110:14 下午
from PyQt5.QtWidgets import QComboBox


class BaseComBoBox(QComboBox):
    def __init__(self):
        super(BaseComBoBox, self).__init__()

    def getId(self):
        data = self.currentText()
        arr = data.split('|')
        return arr[1]

    def getText(self):
        data = self.currentText()
        arr = data.split('|')
        return arr[0]

    # def selectedById(self, id=0):
    #     for i in range(len(self.__data)):
    #         model = self.__data[i]
    #         if model.id == id:
    #             self.setCurrentIndex(i)
    #             break